#include <text/Creator.h>
#include <text/LookupState.h>

#include <system/assert.h>

namespace liba {
namespace text {

Creator::Creator()
{
	if (g_lookupState)
	{
		LIBA_FAIL("g_dictionaries is already initialized. It seems like you've created two creators");
		return;
	}

	g_lookupState = new LookupState();
}

Creator::~Creator()
{
	if (!g_lookupState)
		return;

	delete g_lookupState;
	g_lookupState = 0;
}

} // namespace text
} // namespace liba